<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
    <title>Bootstrap 4的新版式</title>
    <!--    Bootstrap核心css文件-->
    <link rel="stylesheet" href="https://cdn.bootcss.com/twitter-bootstrap/4.4.1/css/bootstrap.min.css">

</head>
<body>
<h4>图片对齐</h4>
<div class="clearfix">
    <img src="https://img.ingping.com/images/suit/L/20206/202006021745015425135.jpg" class="float-left" width="200" alt="">
    <img src="https://img.ingping.com/images/suit/L/20206/202006021745015425135.jpg" class="float-right" width="200" alt="">
</div>
<p class="text-center">浮动类实现左右对齐</p>
<div class="text-center">
    <img src="https://img.ingping.com/images/suit/L/20206/202006021745015425135.jpg" alt="" width="200">
    <p class="text-center">文本类实现水平居中</p>
</div>
<div>
    <img src="https://img.ingping.com/images/suit/L/20206/202006021745015425135.jpg" alt="" class="mx-auto d-block" width="200">
    <p class="text-center">外边距类实现水平居中</p>
</div>

<!--引入js文件-->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"></script>
<!--Bootstrap核心JavaScript文件-->
<script src="https://cdn.bootcss.com/twitter-bootstrap/4.4.1/js/bootstrap.min.js"></script>
</body>
</html>